package com.takepoints21.mobile;

import com.takepoints.android.bo.MemberProfile;
import com.takepoints.android.TPConst;
import com.takepoints.android.services.SecurityServices;

import android.os.Bundle;
import android.widget.TextView;

public class MyProfile extends BaseActivity {
	
	@Override
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.myprofile);
        manageMenu(0);
        
        MemberProfile profile = SecurityServices.getMyInfo(getSharedIntValue(TPConst.PRF_MEMBER_ID));
        
        TextView txtMemSince = (TextView)findViewById(R.id.txtMemSince);
        txtMemSince.setText("เป็นสมาชิกเมื่อ   " + profile.getSince());
        
        TextView txtRedeem = (TextView)findViewById(R.id.txtRedeem);
        txtRedeem.setText("แต้มที่สามารถ\nใช้แลกได้\n\n" + profile.getRedeemPoint());
        
        TextView txtPending = (TextView)findViewById(R.id.txtPending);
        txtPending.setText("แต้มที่รอการยืนยัน\nจากร้านค้า\n\n" + profile.getPendingPoint());
	}
	
}
